package com.bba.manager.common.model.order;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 采购订单表
 * </p>
 *
 * @author zzy
 * @since 2025-08-12
 */
@Getter
@Setter
@TableName("purchase")
public class Purchase implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 采购订单号
     */
      @TableId(value="purchase_no",type = IdType.ASSIGN_ID)
    private Long purchaseNo;

    /**
     * 采购订单状态(1，待审核 2，已接受 3，已拒绝)
     */
    @TableField("status")
    private String status="1";

    /**
     * 采购订单类型(1，汽车 2，配件)
     */
    @TableField("type")
    private String type;

    /**
     * 地址
     */
    @TableField("address")
    private String address;

    /**
     * 金额
     */
    @TableField("total_price")
    private BigDecimal totalPrice;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
